import java.util.Scanner;

public class Main {

    /**
     * WY3 小易打怪升级
     * https://www.nowcoder.com/practice/fe6c73cb899c4fe1bdd773f8d3b42c3d?tpId=122&tqId=33649&ru=/exam/oj
     * @param a
     * @param b
     * @return 最大公约数
     */
    static int gac(int a,int b)
    {
        if(b == 0) return a;

        return gac(b,a % b);
    }
    public static void main2(String[] args)
    {
        Scanner in = new Scanner(System.in);

        while (in.hasNextInt())
        {
            int n = in.nextInt(),a = in.nextInt();

            for(int i = 0;i < n;i++)
            {
                int b = in.nextInt();
                if(a >= b)
                {
                    a += b;
                }
                else
                {
                    a+= gac(a,b);
                }
            }
            System.out.println(a);
        }
    }

    /**
     * JZ47 礼物的最大值
     * https://www.nowcoder.com/practice/2237b401eb9347d282310fc1c3adb134?tpId=265&tqId=39288&ru=/exam/oj
     */

    static int[][] dp = new int[210][210];

    public int maxValue (int[][] grid)
    {
        int m = grid.length,n = grid[0].length;

        for(int i = 1;i <= m;i++)
        {
            for(int j = 1;j <= n;j++)
            {
                dp[i][j] = Math.max(dp[i - 1][j],dp[i][j-1]) + grid[i - 1][j - 1];
            }
        }
        return dp[m][n];
    }

    /**
     * NC214850 对称之美
     *https://ac.nowcoder.com/acm/problem/214850
     * @param args
     */
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        int t  = in.nextInt();

        while (t-- != 0) {

            int n = in.nextInt();
            boolean[][] hash = new boolean[n][26];
            for (int i = 0; i < n; i++) {
                char s[] = in.next().toCharArray();
                for(char x : s)
                {
                    hash[i][x - 'a'] = true;
                }
            }

            //双指针遍历
            int left = 0, right = n - 1;
            while (left < right)
            {
                if(check(hash,left,right))
                {
                    left++;right--;
                }
                else break;
            }
            if (left < right) System.out.println("No");
            else System.out.println("Yes");
        }
    }

    static boolean check(boolean[][] hash,int left,int right)
    {
        for (int i = 0; i < 26; i++) {
            if(hash[left][i] && hash[right][i])
                return true;
        }
        return false;
    }


    private static  boolean is_have_comment_character(String s1,String s2) {
        int len1 = s1.length();
        int len2 = s2.length();

        for (int i = 0; i < len1; i++) {
            for (int j = 0; j < len2; j++) {
                if (s1.charAt(i) == s2.charAt(j))
                    return true;
            }
        }
        return false;
    }

}